package com.fengye.school.model.school.subject;

import com.fengye.school.model.BaseEntity;
import com.fengye.school.model.school.Subject;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

@Table(name = "tb_s_subject_book")
@org.hibernate.annotations.Table(appliesTo = "tb_s_subject_book", comment = "科目参考书籍表")
@Entity
@Getter
@Setter
public class SubjectBooks extends BaseEntity {

    /**
     * 教学计划内容
     */
    @Column(name = "title", columnDefinition = "varchar(255) comment '科目参考书籍名称'")
    private String title;

    /**
     * 排序
     */
    @Column(name = "book_order", columnDefinition = "int comment '参考书籍排序'")
    private int bookOrder;

    @ManyToOne
    @JoinColumn(name = "subject_id", columnDefinition = "bigint comment '科目id'")
    private Subject subject;
}
